<div class="clientCompanies view">
  <h2><?php echo __('Client Company'); ?></h2>
  <dl>
    <dt><?php echo __('Ciudad'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['city']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Address'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['address']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Email'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['email']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Saldo'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['saldo']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Social Razon'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['social_razon']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Phone'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['phone']); ?>
      &nbsp;
    </dd>
    <dt><?php echo __('Cuit'); ?></dt>
    <dd>
      <?php echo h($clientCompany['ClientCompany']['cuit']); ?>
      &nbsp;
    </dd>
  </dl>
</div>
<div class="actions">
  <h3><?php echo __('Opciones'); ?></h3>
  <ul>
    <li><?php echo $this->Html->link(__('Crear Empresa'), array('action' => 'add')); ?></li>
    <li><?php echo $this->Html->link(__('Ver Ordenes de Ruta'), array('controller' => 'orders', 'action' => 'index')); ?></li>
    <li><?php echo $this->Html->link(__('Nueva Orden'), array('controller' => 'orders', 'action' => 'add')); ?> </li>
    <li><?php echo $this->Html->link(__('Listado Ordenes'), array('controller' => 'orders', 'action' => 'index')); ?> </li>

  </ul>
</div>
<div class="related">
  <h3><?php echo __('Related Orders'); ?></h3>
  <?php if (!empty($clientCompany['Order'])): ?>
    <table cellpadding = "0" cellspacing = "0">
      <tr>
        <th><?php echo __('Id'); ?></th>
        <th><?php echo __('User Id'); ?></th>
        <th><?php echo __('Company Id'); ?></th>
        <th><?php echo __('Driver Id'); ?></th>
        <th><?php echo __('Product Id'); ?></th>
        <th><?php echo __('Vehicle Id'); ?></th>
        <th><?php echo __('Coupled Id'); ?></th>
        <th><?php echo __('Origin'); ?></th>
        <th><?php echo __('Destination'); ?></th>
        <th><?php echo __('Details'); ?></th>
        <th><?php echo __('Debit'); ?></th>
        <th><?php echo __('Credit'); ?></th>
        <th><?php echo __('Total'); ?></th>
        <th><?php echo __('Date'); ?></th>
        <th><?php echo __('Client Company Id'); ?></th>
        <th class="actions"><?php echo __('Actions'); ?></th>
      </tr>
      <?php
      $i = 0;
      foreach ($clientCompany['Order'] as $order):
        ?>
        <tr>
          <td><?php echo $order['id']; ?></td>
          <td><?php echo $order['user_id']; ?></td>
          <td><?php echo $order['company_id']; ?></td>
          <td><?php echo $order['driver_id']; ?></td>
          <td><?php echo $order['product_id']; ?></td>
          <td><?php echo $order['vehicle_id']; ?></td>
          <td><?php echo $order['coupled_id']; ?></td>
          <td><?php echo $order['origin']; ?></td>
          <td><?php echo $order['destination']; ?></td>
          <td><?php echo $order['details']; ?></td>
          <td><?php echo $order['debit']; ?></td>
          <td><?php echo $order['credit']; ?></td>
          <td><?php echo $order['total']; ?></td>
          <td><?php echo $order['date']; ?></td>
          <td><?php echo $order['client_company_id']; ?></td>
          <td class="actions">
            <?php echo $this->Html->link(__('View'), array('controller' => 'orders', 'action' => 'view', $order['id'])); ?>
            <?php echo $this->Html->link(__('Edit'), array('controller' => 'orders', 'action' => 'edit', $order['id'])); ?>
    <?php echo $this->Form->postLink(__('Delete'), array('controller' => 'orders', 'action' => 'delete', $order['id']), null, __('Are you sure you want to delete # %s?', $order['id'])); ?>
          </td>
        </tr>
    <?php endforeach; ?>
    </table>
<?php endif; ?>

  <div class="actions">
    <ul>
      <li><?php echo $this->Html->link(__('New Order'), array('controller' => 'orders', 'action' => 'add')); ?> </li>
    </ul>
  </div>
</div>
